Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 9 - Camera Objects


Using Camera Objects

You create a camera object by filling in the fields of the appropriate data structure (for example, a structure of type TQ3ViewAngleAspectCameraData for an aspect ratio camera) and calling an appropriate constructor function (for example, Q3ViewAngleAspectCamera_New for an aspect ratio camera). Then, no matter what kind of camera you've created, you need to attach the camera to a view object, by calling the Q3View_SetCamera function. See Listing 1-8 on page 1-27 and Listing 1-9 on page 1-28 for complete code samples that create a camera and attach it to a view object.

You can change the characteristics of a view's camera by calling camera object editing routines. For example, you can change the aspect ratio of an aspect ratio camera by calling the Q3ViewAngleAspectCamera_SetAspectRatio function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996